<div class="fui-cell" style="padding:0.5rem" id="daterange-date-settime" ng-init="pagedata.settimg()">
					<div class="jy-3" id="div_intime" style="width:40%">
						<div style="font-size:0.75rem">入住</div>
						<div id="intime" class="bold" style="font-size:0.8rem">
							{{pagedata.post.intime}}
						</div>
					</div>
					<div class="jy-3 c" style="width:20%">
						<span style="font-size:0.75rem;line-height:2rem">{{pagedata.post.day || 1}}晚</span>
					</div>
					<div class="jy-3 r" id="div_endtime" style="width:40%">
						<div style="font-size:0.75rem">离店</div>
						<div id="endtime" class="bold" style="font-size:0.8rem">
							{{pagedata.post.endtime}}
						</div>
					</div>
</div>
<script>
require(["daterangepickerh5"], function($){
				$("#daterange-date-settime").each(function(){
					var elm = this;
					var dt=new Date();
					var date_str=scope.date(parseInt(dt.getTime()/1000),true);
					date_str=date_str.split(' ')[0];
					var start_Date=date_str+' 00:00';
					var end_Date=date_str+' 23:59';
					start_Date='';end_Date='';
					var startDate=new Date();
					var endDate=new Date();
					if(scope.pagedata.post.settime){
						if(scope.pagedata.post.settime.tstart){
							start_Date=scope.date(scope.pagedata.post.settime.tstart,true);
							startDate=new Date(scope.pagedata.post.settime.tstart * 1000);
						}
						if(scope.pagedata.post.settime.tend){
							end_Date=scope.date(scope.pagedata.post.settime.tend,true);
							endDate=new Date(scope.pagedata.post.settime.tend * 1000);
						}
					}
					$(this).daterangepicker({
						minDate:new Date(),
						startDate: startDate,
						endDate: endDate,
						ranges:{},
						opens:'center',
						showCustomRangeLabel:true
					}, function(start, end){
						start = start.unix()
						end = end.unix()
						scope.pagedata.post.intime=scope.date(start,'',true);
						scope.pagedata.post.endtime=scope.date(end,'',true);
						var sDate1 = Date.parse(scope.pagedata.post.intime);
						var sDate2 = Date.parse(scope.pagedata.post.endtime);
						var dateSpan = sDate2 - sDate1;
						dateSpan = Math.abs(dateSpan);
						scope.pagedata.post.day = Math.floor(dateSpan / (24 * 3600 * 1000));
						console.log(scope.pagedata.post);
						scope.post_json('jy_jd/index/upsettime/',scope.pagedata.post,function(res){
						});
						if(scope.pagedata.isupprice){
							scope.upprice();
						}else{
							scope.$evalAsync();
						}
					});
				});
});
</script>